//!!!!!!!!!
//When merging with this branch - need to add GameKit framework & Multipeer framework
//!!!!!!!!!




#import <Foundation/Foundation.h>

//File Paths - if you change anything in Resources change the name here!
#define kMessengerSpriteSheetFilename @":Users:user-27:the-messanger.plist"
//enemy
#define kMessengerEnemySpriteSheetFileName @"RunnerSprite1.plist"

// Need to change this when we implement levels
#define kMapName @"MapTest.tmx"
#define kMapScale 0.45 // will be changed to support different devices
#define kMessengerFileNameBase @"output000"
//enemy
#define kMessengerEnemyFileNameBase @"r"

//Action and animation parameters
//maybe we have to compute them based on the frames per second we run?
#define kMessengerRunFramesNumber 9
#define kMessengerRunAnimationDelay 0.05

//enemy
#define kMessengerEnemyRunFramesNumber 30
#define kMessengerEnemyRunAnimationDelay 0.05

//Player default abilities - might have to make them level specific
#define kMessengerInitialMaxSpeed ccp(50,0)
#define kMessengerJumpHeight 50.0
#define kMessengerJumpDuration 1.0

//Constants for computation
#define kBlindSpotForUserInteraction M_PI/8

//OS version IS OS 7 OR LATER
#define kIsOS7OrLater  ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)

//Names for notifactions when using network
#define kNetworkNotificationNameForCanceledLookingForAnOpponent @"CanceledLookingForAnOpponent"
#define kNetworkNotificationNameForConnectedPeer @"ConnectedPeer"
#define kNetworkNotificationNameForDisconnectedOpponent @"DisconnectedOpponent"
#define kNetworkNotificationNameForReceivedData @"ReceivedData"

#define kNetworkNotificationNamePlayerChoosingCharacter @"PlayerChoosingCharacter"
#define kNetworkNotificationNamePlayerWaitingForEnemyForChoosingCharacter @"EnemyChoosingCharacter"

#define kNetworkNotificationNamePlayerIsReadyToStart @"PlayerIsReadyToStart"
#define kNetworkNotificationNameOpponentIsReadyToStart @"OpponentIsReadyToStart"


// -----------------------------------------------------------------------
// Custom types
// -----------------------------------------------------------------------
typedef enum {
    kMessengerSelf,
    kMessengerEnemy
} MessengerSpriteType;

typedef enum {
    kStateSliding,
    kStateStandingUp,
    kStateRunning,
    kStateJumping,
    kStateLanding,
    kStateBumping
} CharacterState;

typedef enum {
    kObjectTypeNone,
    kPowerUpTypeHealth,
    kPowerUpTypePoints,
    kObstacleLow,
    kObstacleHigh
} GameObjectType;

//if they are more than 10, need to update sinding data in networking
typedef enum {
    kGameStateSinglePlayerChoosingLevel,
    kGameStateLaunchedSinglePlayer,
    kGameStateLaunchedMultiPlayer,
    kGameStateLookingForOpponent,
    kGameStateLookingWhoIsFirst,
    kGameStatePlayerWaitsForLevelAndCharacter,
    kGameStatePlayerChoosingLevelAndCharacter,
    kGameStateUserIsReady,
    kGameStatePaused,
    kGameStatePlaying,
    kGameStateNotPlaying,
    kGameStateEndGame
} GameState;

//to be modified - based on needed information for positioning the enemy on the player's screen
typedef struct {
    CGPoint position;
    CharacterState state;
}EnemyInfo;

//to be modified - based on needed information from player who choose lavel and character
typedef struct {
    MessengerSpriteType spriteCharacter;
    int level;
} CharacterAndLevelToPlay;

//typedef enum
//{
//    
//}MessageType;
